﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Invoices.aspx.cs" Inherits="FE_Invoices" Title="Untitled Page" %>

<asp:Content ID="Content2" ContentPlaceHolderID="LeftContent" runat="Server">
    <gr:Container ID="uxContainer" runat="server" HeaderText="Tìm kiếm" AllowExpandCollapse="false">
        <div class="ContainerInput">
            <table width="100%" cellpadding="0" cellspacing="0" class="LeftFilter">               
                <tr>
                    <td class="label">
                        Ngày tạo từ
                    </td>
                </tr>
                <tr>
                    <td>
                        <gr:GuruDatePicker ID="uxFromDate" Width="180px" runat="server">
                        </gr:GuruDatePicker>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Đến ngày
                    </td>
                </tr>
                <tr>
                    <td>
                        <gr:GuruDatePicker ID="uxToDate" Width="180px" runat="server">
                        </gr:GuruDatePicker>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Mã hóa đơn
                    </td>
                </tr>
                 <tr>
                    <td>
                        <gr:TextBox Width="100%" runat="server" ID="uxInvoiceNumber" MaxLength="20"></gr:TextBox>
                    </td>
                </tr>
            </table>
            <gr:ContainerButton ID="ContainerButton1" runat="server">
                <gr:LinkButton runat="server" ID="uxSearch" OnClick="uxSearch_Click" CssClass="button buttonGray buttonFixedShort"
                    Text="Tìm kiếm" CssClassIcon="icon_search" />
            </gr:ContainerButton>
        </div>
    </gr:Container>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="PageContent" runat="Server">
    <gr:Container ID="Container1" runat="server" HeaderText="Danh sách hóa đơn">
        <gr:GuruGrid runat="server" ID="uxInvoicesGrid" AllowSorting="true" AllowFilteringByColumn="false"
            AllowPaging="true" PageSize="10" OnNeedDataSource="uxInvoicesGrid_NeedDataSource"
            OnItemDataBound="uxInvoicesGrid_ItemDataBound">
            <MasterTableView DataKeyNames="InvoiceID">
                <Columns>
                    <gr:GuruGridBoundColumn Format="Sequence" HeaderText="Seq" />
                    <gr:GuruGridTemplateColumn HeaderText="Đã thu tiền" UniqueName="CheckedOutAction"
                        ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <gr:CheckBox runat="server" ID="uxReceivedMoney" Enabled="false" />
                        </ItemTemplate>
                    </gr:GuruGridTemplateColumn>
                    <gr:GuruGridTemplateColumn HeaderText="In HD" UniqueName="Print" ItemStyle-HorizontalAlign="Center"
                        ItemStyle-Width="40px">
                        <ItemTemplate>
                            <gr:LinkButton runat="server" CssClass="rgLinkIcon rgLinkPrint" IsStandard="true"
                                ID="uxPrint" Text="In" />
                        </ItemTemplate>
                    </gr:GuruGridTemplateColumn>
                    <gr:GuruGridBoundColumn DataField="InvoiceNumber" UniqueName="InvoiceNumber" Format="StaticString"
                        HeaderText="Mã hóa đơn">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="GuestName" UniqueName="GuestName" HeaderText="Khách hàng">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="RoomFees" Format="Currency" HeaderText="Tiền phòng">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="ServiceFees" Format="Currency" HeaderText="Tiền dịch vụ">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="AddSubTotal" Format="Currency" HeaderText="Phụ thu">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="Promotion" Format="Currency" HeaderText="Khuyến mãi">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="VAT" Format="Number" HeaderText="VAT(%)">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="Amount" Format="Currency" HeaderText="Thành tiền">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="Prepaid" Format="Currency" HeaderText="Trả trước">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="Remaining" Format="Currency" HeaderText="Còn lại">
                    </gr:GuruGridBoundColumn>
                    <gr:GuruGridBoundColumn DataField="CreatedDate" Format="Date" HeaderText="Ngày tạo">
                    </gr:GuruGridBoundColumn>
                </Columns>
            </MasterTableView>
        </gr:GuruGrid>
    </gr:Container>
    <gr:GuruAjaxManagerProxy runat="server" ID="GuruAjaxManagerProxy1">
        <AjaxSettings>
            <gr:GuruAjaxSetting AjaxControlID="uxInvoicesGrid">
                <UpdatedControls>
                    <gr:GuruUpdatedControl ControlID="uxInvoicesGrid" />
                </UpdatedControls>
            </gr:GuruAjaxSetting>
        </AjaxSettings>
    </gr:GuruAjaxManagerProxy>

    <script type="text/javascript">
        function ReloadPage(){
            ReloadRadGrid("<%=uxInvoicesGrid.ClientID %>");
        }
    </script>

</asp:Content>
